package com.example.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.*;


public class WelcomeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welcome);
        Log.v("tag_main", "onCreate WelcomeActivity");
        //获取button按钮
        Button start = (Button) findViewById(R.id.go_login);

        //为button 按钮添加监听事件
        start.setOnClickListener(new View.OnClickListener() {


            public void onClick(View v) {

                Toast toast = Toast.makeText(WelcomeActivity.this, "进入登陆界面!!", Toast.LENGTH_SHORT);
                //显示toast信息
                toast.show();
                Intent intent = new Intent(WelcomeActivity.this, LoginActivity.class);
                startActivity(intent);
            }
        });


    }
}

